<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="apple-mobile-web-app-capable" content="no">
    <meta content="True" name="HandheldFriendly">
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>{{ title }}</title>
    <meta name="keywords" content="{{ keywords }}">
    <meta name="description" content="{{ title }}">
    <meta name="author" content="{{ author }}">
    <link href="/css/vendors.min.css" rel="stylesheet">
    <link href="/css/assets.min.css" rel="stylesheet">
</head>
<body class="page-home" data-controller-name="home">
<div class="header navbar navbar-expand flex-md-row bd-navbar">
    <div class="container d-sm-flex">
        <div class="navbar-header d-none d-md-flex" id="navbar-header" data-turbolinks-permanent><a href="/"
                                                                                                    class="navbar-brand"><b>DLang</b>
            China</a></div>
        <div class="navbar-nav-scroll">
            <ul class="main-nav-menu navbar-nav d-flex">
                <li class="nav-item"><a class="nav-link {% if route_path == '/' %}active{% endif %}" href="/">Home</a></li>
            </ul>
        </div>
        <div class="ml-auto d-md-flex">
            <form class="navbar-form d-none d-lg-flex mr-2 form-search active" action="/search" method="GET"><i class="fa btn-search fa-search"></i> <input class="form-control" name="k" type="text" value=""
            placeholder="Search"></form>
            {% if session_user %}
                <ul class="nav navbar-nav align-items-center justify-content-end" style="margin-right: 15px">
                    <li class="nav-item dropdown dropdown-avatar"><a href="#" class="dropdown-toggle nav-link"
                                                                     id="navbar-user-menu" data-toggle="dropdown"
                                                                     role="button" aria-expanded="false">
                        {% if session_user.avatar != "" %}
                            <img class="media-object avatar-32" src="{{session_user.avatar}}">
                        {% else %}
                            <img class="media-object avatar-32" src="/images/medium-default-avatar.png">
                        {% endif %}
                        <span class="user-name">{% if session_user.nickname != "" %}{{session_user.nickname}}{% else %}{{session_user.username}}{% endif %}</span></a>
                            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbar-user-menu"><a
                                class="dropdown-item" href="{{ passport_profile }}" target="_blank">{% if session_user.nickname != "" %}{{session_user.nickname}}{% else %}{{session_user.username}}{% endif %}</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="{{ passport_profile }}" target="_blank">User center</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" rel="nofollow" data-method="delete" href="/logout">Logout</a>
                        </div>
                    </li>
                </ul>
            {% else %}
                <ul class="main-nav-menu navbar-nav align-items-center justify-content-end">
                    
                        <li class="nav-item"><a class="nav-link" href="{{ url("user.user.register", "") }}">Register</a></li>
                        <li class="nav-item"><a class="nav-link" href="{{ url("user.user.login", "") }}">Login</a></li>
                
                </ul>
            {% endif %}
        </div>
    </div>
</div>

<div class="sub-navbar node-header hide-ios">
    <div class="container">
        <!-- Breadcrumbs -->
        {% if breadcrumbs.defined and breadcrumbs.length>0 %}
        <ul class="breadcrumb" style="margin-top: 0;margin-bottom: 0; background: #ffffff">
            {% for item in breadcrumbs %}
                {% if item.link and not loop.last %}
                    <li><a href="{{ item.link }}">{{ item.title }}</a></li>
                {% else %}
                    <li class="active">{{ item.title }}</li>
                {% endif %}
            {% endfor %}
        </ul>
        {% endif %}
    </div>
</div>
